package com.gxuwz.check.service.admin.impl;

import com.gxuwz.check.dao.admin.ICollegeDao;
import com.gxuwz.check.dao.admin.ICourseDao;
import com.gxuwz.check.model.entity.SysCollegeEntity;
import com.gxuwz.check.service.admin.ICollegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("CollegeServiceImpl")
public class CollegeServiceImpl implements ICollegeService {
    @Autowired
    private ICollegeDao collegeDao;

    @Override
    public List<SysCollegeEntity> listCollege(int page) {
        List<SysCollegeEntity> list = collegeDao.listCollege(page);
        return list;
    }

    @Override
    public void delete(Integer collegeId) {
        collegeDao.delete(collegeId);
    }

    @Override
    public void edit(Integer collegeId , String collegeName) {
        collegeDao.edit(collegeId , collegeName);
    }

    @Override
    public void save(String collegeName) {
        collegeDao.save(collegeName);
    }

    @Override
    public SysCollegeEntity findCollegeById(Integer collegeId) {
        return collegeDao.findCollegeById(collegeId);
    }
}
